-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix disable native toolset install logic #4265
Fix disable native toolset install logic #4265
Conversation
Coreclr validation build - https://dev.azure.com/dnceng/public/_build/results?buildId=410692&view=results |
Probably a good idea a kick off a Winforms build, since that was the original issue. |
Change itself looks fine to me. |
Technically, they don't exercise this particular code path, but I agree that more validation is good and it would be bad to unintentionally regress them yet again. Thanks for the note, I created dotnet/winforms#2260 to validate winforms. |
You are right, I accidently reverted the condition. Are you sure that you would do a Test-Path on a boolean in powershell? Doesn't a -ne suffice? |
The code is following a quirky pattern. Essentially, "DisableNativeToolsetInstalls" is being used as a switch rather than a boolean. If it's present, then the flag is enabled. Meaning, DisableNativeToolsetInstalls=$true and DisableNativeToolsetInstalls=$false are equivalent. Another option would be to do something like If((test-path variable:DisableNativeToolsetInstalls) - and $DisableNativeToolsetInstalls) That would be the more expected behavior. I won't be able to do any validation or make any changes on this until tomorrow. |
@chcosta @sunandabalu I just did a thorough root analysis of the bugs introduced in 7a82f9a:
I submitted the fixes into this PR and validated it offline on both corefx and the runtime repository. |
Merging to unblock repos which might have been broken by my previous attempt. |
Is there a scenario we should add to the arcade-validation repo that would have caught this, and would catch similar problems going forward? |
Yes that would be good if we want to rely on the native toolset bootstrapping goind forward. |
I think adding unit tests to arcade for our powershell scripts would be my preferred approach. I'm uncertain what the state of unit testing bash scripts is though |
No description provided.